package junit;

import java.util.Random;

import org.junit.Test;

public class RandomChar {
	
	@Test
	public void getRandomAlphanumeric() {
		char ch = '0';
		Random random = new Random();
		for(int i = 0 ; i < 5 ; i++){
			int num = random.nextInt(3);
			if(num==0){
				ch = (char) (48 + random.nextInt(10));
			}else{
				ch = (char) (65 + random.nextInt(26));
			}
			System.out.print(ch);
		}
	}

}
